update macos github workflow (#1265)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 11 Apr 2024 12:24:55 +0000 (06:24 -0600)
committerGitHub <noreply@github.com>
Thu, 11 Apr 2024 12:24:55 +0000 (06:24 -0600)
* update github macos runners.

macos-11 runner is now deprecated.

* update xcode versions for github

* update XML_CATALOG_FILES for macos-14 runner

* work around macos-14 runner brew locations

* find homebrew gsed on apple silicon

* generalize brew location detection in macos workflow

* update python version for arm availability

* push xcode versions to latest minor levels.

.github/workflows/macos.yml
tools/fixdoc

index adb6086bad0d4a4b8427f9210a171c281f53c67c..5244f87412dfc6a57aa97481fe42878a3b15e4ba 100644 (file)
@@ -19,25 +19,25 @@ jobs:
       matrix:
         include:
           - QT_VERSION: '5.15.2'
-            XCODE_VERSION: '12.5.1'
+            XCODE_VERSION: '13.4.1'
             GENERATOR: 'Ninja'
             RELEASE: false
-            os: macos-11
+            os: macos-12
           - QT_VERSION: '6.2.4'
-            XCODE_VERSION: '13.4.1'
+            XCODE_VERSION: '14.3.1'
             GENERATOR: 'Xcode'
             RELEASE: false
-            os: macos-12
+            os: macos-13
           - QT_VERSION: '6.2.4'
-            XCODE_VERSION: '13.4.1'
+            XCODE_VERSION: '14.3.1'
             GENERATOR: 'Ninja'
             RELEASE: true
-            os: macos-12
+            os: macos-13
           - QT_VERSION: '6.5.3'
-            XCODE_VERSION: '14.2'
+            XCODE_VERSION: '15.3'
             GENERATOR: 'Ninja'
             RELEASE: false
-            os: macos-12
+            os: macos-14
 
     steps:
     - name: Checkout repository
@@ -54,7 +54,7 @@ jobs:
       if: steps.cache.outputs.cache-hit != 'true'
       uses: actions/setup-python@v5
       with:
-        python-version: '3.9'
+        python-version: '3.12'
 
     - name: Qt install
       if: steps.cache.outputs.cache-hit != 'true'
@@ -82,7 +82,7 @@ jobs:
 
     - name: Script
       env:
-        XML_CATALOG_FILES: /usr/local/etc/xml/catalog
+        XML_CATALOG_FILES: ${{  runner.arch == 'ARM64' && '/opt/homebrew/etc/xml/catalog' || '/usr/local/etc/xml/catalog' }}
       run: |
         source ${HOME}/Cache/qt-${{ matrix.QT_VERSION }}.env
         sudo xcode-select --switch /Applications/Xcode_${{ matrix.XCODE_VERSION }}.app
index 4b10980dee2ea2000b74746fbe53f2a25544e75e..e53749c3c113c10403e5d3ebebe6947256a8946f 100755 (executable)
@@ -12,9 +12,10 @@ DIR=$1
 TITLE=$2
 
 SED="sed"
-# MacOS using Homebrew
-[ -f /usr/local/bin/gsed ] && SED=/usr/local/bin/gsed
-[ -f /opt/local/bin/gsed ] && SED=/opt/local/bin/gsed
+# macOS using Homebrew may be /usr/local (macOS intel) or /opt/homebrew (apple silicion) ... 
+if command -v gsed >/dev/null 2>&1; then
+  SED=$(command -v gsed)
+fi
 
 [ ! -d "$DIR/tpl" ] && mkdir -p "$DIR/tpl"